package com.cjkj.equipment.mapper;

import com.cjkj.equipment.domain.EquipmentTj03MonitorRecordsEcg;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * TJ03设备心电数据Mapper接口
 * 
 * @author cjkj
 * @date 2025-05-27
 */
public interface EquipmentTj03MonitorRecordsEcgMapper
{
    /**
     * 查询TJ03设备使用期间最新一条心电数据
     * @return TJ03设备心电数据
     */
    EquipmentTj03MonitorRecordsEcg selectLastEcgDataByEquipment(@Param("equipmentNo")String equipmentNo,
                                                                  @Param("startTime") Date startTime);
    /**
     * 查询TJ03设备心电数据
     * @return TJ03设备心电数据
     */
    List<EquipmentTj03MonitorRecordsEcg> selectEcgDataByEquipment(@Param("equipmentNo")String equipmentNo,
                                                                  @Param("startUseTime")Date startUseTime,
                                                                  @Param("lastDataTime")Date lastDataMillisecond,
                                                                  @Param("tenMinutesAgo")Date tenMinutesAgo);

    /**
     * 新增TJ03设备心电数据
     * @param equipmentTj03MonitorRecordsEcg TJ03设备心电数据
     * @return 结果
     */
    int insertEquipmentTj03MonitorRecordsEcg(EquipmentTj03MonitorRecordsEcg equipmentTj03MonitorRecordsEcg);

}
